<?php
    namespace app\index\validate;
    use think\Validate;
    class Member extends Validate{
        protected $rule=[
            'phone' => 'require|number|length:11',
        ];
        protected $message=[
            'phone.unique' => '手机号已经重复',
            'phone.require' => '手机不能为空',
            'phone.number' => '手机号必须是数字',
            'phone.length' => '手机长度必须是11位',
        ];
        protected $scene = [
            'check_phone' => ['phone']
        ];
    }

?>